/**
 * 
 */
package com.neelsys.visualisation.domain;

import org.springframework.data.neo4j.annotation.GraphId;
import org.springframework.data.neo4j.annotation.NodeEntity;

/**
 * @author madhu
 * 
 */
@NodeEntity
public abstract class BaseNodeEntity {

	@GraphId
	protected Long nodeId;

	public Long getNodeId() {
		return nodeId;
	}

	@Override
	public boolean equals(Object o) {
		if (this == o)
			return true;
		if (o == null || getClass() != o.getClass())
			return false;

		BaseNodeEntity baseNode = (BaseNodeEntity) o;
		if (nodeId == null)
			return super.equals(o);
		return nodeId.equals(baseNode.nodeId);

	}

}
